package com.jz.banner.screen.banner.bean

import cn.jzvd.Jzvd


class LaunchBean {
    var data: LaunchBean? = null
    var code: Int = 0
    var message: String? = null


    var banner_params: BannerParams? = null
    var res_info: MutableList<ResInfo>? = null
    var setting_info: SettingInfo? = null
    var upgrade_info: UpgradeInfo? = null
}

class BannerParams {
    var T1 = 5 //称重界面等待的时间跳转商户界面
    var T2 = 5 //商户界面等待的时间跳转广告界面
    var T3 = 60 //广告界面等待的时间跳转商户界面
    var T4 = 3 //广告图之间切换轮播时间
    var display_type = 0 //0:默认；1:充满；2:填充；3:原型 -->针对视频来设置
    var scale_type = 0 //0:默认居中全展示；1:居中裁剪 -->针对图片来设置

    //var T3_1 = 6 //广告界面图片播放的时长
    //var T3_2 = 54 //广告界面视频播放的时长
}

class ResInfo {
    var launch_id: String? = null  //广告ID
    var device_id: String? = null  //设备ID
    var device_code: String? = null  //设备编码
    var customer_id: String? = null  //客户ID
    var org_id: String? = null  //市场ID
    var launch_material: MutableList<LaunchMaterial>? = null  //广告详情
}

class LaunchMaterial {
    var launch_id: String? = null  //广告ID
    var material_id: String? = null  //素材ID
    var mat_name: String? = null  //素材名称
    var mat_type = 1  //素材类型 1 广告 2直播素材
    var file_url: String? = null  //文件地址
    var cover_url: String? = null  //封面地址
    var file_type = 1  //文件类型 1 图片 2 视频
    var is_last = 0  //1是最后一个素材图片或者视频
}

class SettingInfo {
    var polling_statistics_time = 5L  //广告播放时长统计上传数据轮询时间
    var polling_statistics_items = 500  //每次上传广告统计的数目500条
    var upload_failed_times = 4  //超过4次失败上传广告统计数据就自动删除
    var polling_get_banner_res_time = 5L  //获取广告资源等数据的轮询时间
    var polling_get_banner_play_info_time = 1L  //获取设备正在播放广播内容的轮询时间
}

class UpgradeInfo {
    var url: String? = null  //app下载地址
    var version_code = 0  //线上版本号
}

//TODO:把下面两个东西，合并成一个，同时结合后台。
//data class VideoBean(var videoUrl: String? = null, var imageUrl: String? = null, var displayType: Int = Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP)
//data class ImageBean(var url: String? = null, var type: Int = 0)//0是fitCenter;1是centerCrop

class ResFileBean {
    var launch_id: String? = null
    var device_id: String? = null
    var device_code: String? = null
    var customer_id: String? = null
    var org_id: String? = null
    var material_id: String? = null
    var mat_name: String? = null
    var mat_type: Int? = null
    var file_url: String? = null
    var cover_url: String? = null
    var file_type: Int? = null
    var display_type: Int = Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP
    var scale_type: Int = 0
    var is_last: Int = 0
}

//class ResFileSubscribeBean {
//    var resFileBean: ResFileBean? = null
//    var play_start_date: String? = null
//    var play_time: Int? = null
//    var play_num: Int? = null
//}

class ClientResFileBean{
    var mBannerVideoList: MutableList<ResFileBean> = mutableListOf()

    /* VideoBean(Urls.VIDEO_DEFAULT_URL, Urls.IMAGE_DEFAULT_URL)*/
    var mBannerImageList: MutableList<ResFileBean> = mutableListOf()
}